package club.ruanx.movie.service.impl;


import club.ruanx.bean.PageBean;
import club.ruanx.core.service.base.BaseServiceImpl;
import club.ruanx.movie.entity.MovieComment;
import club.ruanx.movie.repository.MovieCommentRepository;
import club.ruanx.movie.service.MovieCommentService;
import org.springframework.data.domain.Page;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author 阮胜
 * @date 2018/11/11 19:50
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class MovieCommentServiceImpl extends BaseServiceImpl<MovieComment, String, MovieCommentRepository> implements MovieCommentService {

    @Override
    public Page<MovieComment> findAllByMovieId(String movieId, PageBean pageBean) {
        return repository.findAllByMovieId(movieId, pageBean.toPageable());
    }
}
